package cn.lisens.valid.entity;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;

import com.fasterxml.jackson.annotation.JsonFormat;

import lombok.Data;

@Data
public class User implements Serializable{
	private static final long serialVersionUID = 1L;
	
	private Integer id;
	
	private String userCode;
	
	@NotBlank
    @Size(min = 3, max = 20, message = "用户名长度必须在3-20个字符之间")
    private String username;
	
	private Integer age;
	
	@JsonFormat(pattern = "yyyy-MM-dd")
	private Date birth;
	
	List<String> workUnits;
}
